package com.fr.data.core.define;

import com.fr.base.core.ComparatorUtils;
import com.fr.data.util.SortOrder;
import java.io.Serializable;

public class SortColumn
  implements Cloneable, Serializable
{
  private String name;
  private SortOrder sortOrder;

  public SortColumn(String paramString)
  {
    this(paramString, new SortOrder(1));
  }

  public SortColumn(String paramString, SortOrder paramSortOrder)
  {
    this.name = null;
    this.sortOrder = null;
    setName(paramString);
    setSortOrder(paramSortOrder);
  }

  public String getName()
  {
    return this.name;
  }

  public void setName(String paramString)
  {
    this.name = paramString;
  }

  public SortOrder getSortOrder()
  {
    return this.sortOrder;
  }

  public void setSortOrder(SortOrder paramSortOrder)
  {
    this.sortOrder = paramSortOrder;
  }

  public boolean equals(Object paramObject)
  {
    if (!(paramObject instanceof SortColumn))
      return false;
    SortColumn localSortColumn = (SortColumn)paramObject;
    return ((ComparatorUtils.equals(localSortColumn.getName(), getName())) && (ComparatorUtils.equals(localSortColumn.getSortOrder(), getSortOrder())));
  }

  public Object clone()
    throws CloneNotSupportedException
  {
    return super.clone();
  }
}